import { createApp } from 'vue'

import App from './App.vue'
import router from './router'

// 配置 ant-design  全局
import '@/assets/styles/ant-design-base'

// 引入pinia
import pinia from '@/stores'

// 国际化
import { setupI18n } from '@/locales/setupI18n'

// 全局前置路由
import '@/config/permission'

// 引导启动
async function bootstrap() {
	// 创建应用实例
	const app = createApp(App)

	app.use(pinia).use(router)

	await setupI18n(app)
	// 挂载应用
	app.mount('#app')
}

bootstrap()
